#include "seg.h"
unsigned char duanla[] = {0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90,0xff,0xbf,0xc6};
unsigned char weila[] = {0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80};

void seg_disp(unsigned char wei,duan,point)
{
	P0 = 0xFF;
	P2 = P2 & 0X1F | 0XE0;
	P2 = P2 & 0X1F;
	
	P0 = weila[wei];
	P2 = P2 & 0X1F | 0XC0;
	P2 = P2 & 0X1F;
	
	P0 = duanla[duan];
	if(point)
	P0 = P0 & 0x7f;
	P2 = P2 & 0X1F | 0XE0;
	P2 = P2 & 0X1F;
}